<template>
  <view class="disposeRecord">
    <u-navbar :is-back="true" title="报警处置记录" :title-bold="true" title-color="#000"></u-navbar>
    <view class="u-p-b-30">
      <u-card
        :border="false"
        box-shadow="0px 0px 8px #ddd6d6"
        :body-style="{ padding: '0 0' }"
        :show-head="false"
        :show-foot="false"
      >
        <view slot="body">
          <view class="card-row u-flex-col u-p-t-20 u-p-b-30">
            <u-cell-group :border="false">
              <u-cell-item
                v-for="(item, index) in toUrgeData"
                title-width="150"
                :key="index"
                :title="item.name"
                :border-bottom="false"
                :title-style="{ color: '#333333' }"
                :value-style="{
                  display: 'flex',
                  paddingLeft: '20rpx',
                  textAlign: 'left',
                  color: '#666666',
                }"
                :arrow="false"
                :value="data[item.value]"
              ></u-cell-item>
            </u-cell-group>
          </view>
        </view>
      </u-card>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      data: {},
      toUrgeData: [
        {
          name: "报警原因",
          value: "alarmReason",
        },
        {
          name: "处理措施",
          value: "disposalMeasure",
        },
        {
          name: "处理人",
          value: "analysePerson",
        },
        {
          name: "处理时间",
          value: "disposalDate",
        }
      ]
    };
  },
  methods: {},
  onLoad: function (option) {
    this.data = JSON.parse(option.item);
    const type = option.type
    if (type == '0') {
      // 预警
      this.toUrgeData[0].name = '预警原因'
    }
  },
};
</script>

<style>
</style>
